<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-81">
    <%@ include file="/WEB-INF/include/meta.jsp"%>
    <%@ include file="/WEB-INF/include/css.jsp"%>
    <link href="${ctx.resource}/css/goals.css" rel="stylesheet">
    <title>人马君</title>
  </head>
  <body>
    <div class="page-group">
      <div class="page page-current">
        <header class="bar bar-nav fs-header-small">
          <a href="${ctx.host}/rounds/${courseRoundId}/courseware/home" class="icon icon-left pull-left"></a>
          <h1 class="title">目标</h1>
        </header>
        <div class="content goals">
          <div class="goals-grid" style="background: #fbe449;">
            <div class="grid-item">
              <h5 class="goals-title text-center">远期目标</h5>
              <p class="text-center" style="font-size: 0.6rem;">教练会根据您的目标判断合理性及给与适合您的计划</p>
            </div>
            <div class="grid-item">
              <p class="text-center" style="font-size: .6rem; font-weight: 600;"><c:if test="${not empty goal.reachTime or not empty goal.content}">希望在<span style="font-size: 1rem; font-weight: bold;">${goal.reachTime}</span>达成<br/><span style="font-size: 1rem; font-weight: bold;">${goal.content}</span></c:if></p>
            </div>
          </div>

          <div class="content-block" style="padding: 0; margin: 0;">
            <div class="row no-gutter basic-item basic-header">
              <div class="col-25 item"></div>
              <div class="col-25 item">当前数据</div>
              <div class="col-25 item">远期目标数据</div>
              <div class="col-25 item">${weeks}周内目标数字</div>
            </div>
            <c:forEach var="bodyDataType" items="${enums['bodyDataType']}" >
              <div class="row no-gutter basic-item">
                <div class="col-25 item">${bodyDataType.description}<c:if test="${not empty bodyDataType.unit}">(${bodyDataType.unit})</c:if></div>
                <div class="col-25 item bg-color-yellow"><span class="big-size"><fmt:formatNumber value='${targets[bodyDataType.alias].currentValue}' minFractionDigits='0' maxFractionDigits='2'></fmt:formatNumber></span></div>
                <div class="col-25 item"><span class="big-size"><fmt:formatNumber value='${targets[bodyDataType.alias].idealValue}' minFractionDigits='0' maxFractionDigits='2'></fmt:formatNumber></span></div>
                <div class="col-25 item bg-color-yellow"><span class="big-size"><fmt:formatNumber value='${targets[bodyDataType.alias].coachIdealValue}' minFractionDigits='0' maxFractionDigits='2'></fmt:formatNumber></span></div>
              </div>
            </c:forEach>
          </div>
        </div>
      </div>
    </div>
  </body>
</html>
